package org.microservice.system.dao;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.microservice.common.bean.MenuVo;

import java.util.List;
import java.util.Map;

/**
 * Created with IntelliJ IDEA.
 * User: 齐丹枫
 * Date: 2018/6/20
 * Time: 15:48
 * To change this template use File | Settings | File Templates.
 * Description:
 */
@Mapper
public interface SysMenuDao extends BaseMapper<MenuVo>{

    List<MenuVo> getMenuTreeByUserNameAndMenuType(@Param("userName") String userName,@Param("type") String[] menuType);



    List<MenuVo> getMenusByRoleId(@Param("roleId") int roleId);

    List<MenuVo> getMenuListPage(Map<String, Object> params);

    int getMenuListPageTotal(Map<String, String> params);

    void disabledOrEnabledById(@Param("id") int id,@Param("disabled") boolean disabled);

}
